Optimal. Leaf size=70 \[ \frac {(2-p) x \left (1+e^{2 i a} \left (c x^n\right )^{-\frac {2}{n (2-p)}}\right ) \sec ^p\left (a+\frac {i \log \left (c x^n\right )}{n (2-p)}\right )}{2 (1-p)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 70, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {4599, 4603,
270} \begin {gather*} \frac {(2-p) x \left (1+e^{2 i a} \left (c x^n\right )^{-\frac {2}{n (2-p)}}\right ) \sec ^p\left (a+\frac {i \log \left (c x^n\right )}{n (2-p)}\right )}{2 (1-p)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 270
Rule 4599
Rule 4603
Rubi steps
\begin {align*} \int \sec ^p\left (a-\frac {i \log \left (c x^n\right )}{n (-2+p)}\right ) \, dx &=\frac {\left (x \left (c x^n\right )^{-1/n}\right ) \text {Subst}\left (\int x^{-1+\frac {1}{n}} \sec ^p\left (a-\frac {i \log (x)}{n (-2+p)}\right ) \, dx,x,c x^n\right )}{n}\\ &=\frac {\left (x \left (c x^n\right )^{-\frac {1}{n}-\frac {p}{n (-2+p)}} \left (1+e^{2 i a} \left (c x^n\right )^{\frac {2}{n (-2+p)}}\right )^p \sec ^p\left (a-\frac {i \log \left (c x^n\right )}{n (-2+p)}\right )\right ) \text {Subst}\left (\int x^{-1+\frac {1}{n}+\frac {p}{n (-2+p)}} \left (1+e^{2 i a} x^{\frac {2}{n (-2+p)}}\right )^{-p} \, dx,x,c x^n\right )}{n}\\ &=\frac {(2-p) x \left (1+e^{2 i a} \left (c x^n\right )^{-\frac {2}{n (2-p)}}\right ) \sec ^p\left (a+\frac {i \log \left (c x^n\right )}{n (2-p)}\right )}{2 (1-p)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.96, size = 117, normalized size = 1.67 \begin {gather*} \frac {2^{-1+p} e^{i a} (-2+p) x \left (c x^n\right )^{\frac {1}{n (-2+p)}} \left (\frac {e^{\frac {i a (2+p)}{-2+p}} \left (c x^n\right )^{\frac {1}{n (-2+p)}}}{e^{\frac {4 i a}{-2+p}}+e^{\frac {2 i a p}{-2+p}} \left (c x^n\right )^{\frac {2}{n (-2+p)}}}\right )^{-1+p}}{-1+p} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.11, size = 0, normalized size = 0.00 \[\int \sec ^{p}\left (a -\frac {i \ln \left (c \,x^{n}\right )}{n \left (-2+p \right )}\right )\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 149 vs. \(2 (55) = 110\).
time = 2.16, size = 149, normalized size = 2.13 \begin {gather*} \frac {{\left ({\left (p - 2\right )} x e^{\left (\frac {2 \, {\left (-i \, a n p + 2 i \, a n - n \log \left (x\right ) - \log \left (c\right )\right )}}{n p - 2 \, n}\right )} + {\left (p - 2\right )} x\right )} \left (\frac {2 \, e^{\left (\frac {-i \, a n p + 2 i \, a n - n \log \left (x\right ) - \log \left (c\right )}{n p - 2 \, n}\right )}}{e^{\left (\frac {2 \, {\left (-i \, a n p + 2 i \, a n - n \log \left (x\right ) - \log \left (c\right )\right )}}{n p - 2 \, n}\right )} + 1}\right )^{p} e^{\left (-\frac {2 \, {\left (-i \, a n p + 2 i \, a n - n \log \left (x\right ) - \log \left (c\right )\right )}}{n p - 2 \, n}\right )}}{2 \, {\left (p - 1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sec ^{p}{\left (a - \frac {i \log {\left (c x^{n} \right )}}{n \left (p - 2\right )} \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\left (\frac {1}{\cos \left (a-\frac {\ln \left (c\,x^n\right )\,1{}\mathrm {i}}{n\,\left (p-2\right )}\right )}\right )}^p \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________